<template>
    <div id="member">
        <!-- <div class="header">
            <div class="setting"
                @click="gotoUrl('/setting')">
                <svg-icon icon-class="setting"
                    color="#fff"
                    size="18"></svg-icon>
            </div>
        </div> -->
        <!-- 引入返回导航 -->
        <mt-header title="更多功能" fixed>
            <mt-button slot="left" icon="back" @click="handleBack"></mt-button>
        </mt-header>
        
        <div class="body">
            <!-- <div class="my-order">
                <div class="order-icon">
                    <div class="all"
                        @click="gotoUrl('/order', -1)">
                        <svg-icon icon-class="order-all"
                            size="30"
                            color="#8fcd34"></svg-icon>
                        <p>全部</p>
                    </div>
                    <div class="wait-pay"
                        @click="gotoUrl('/order', 0)">
                        <svg-icon icon-class="order-wait-pay"
                            size="30"
                            color="#8fcd34"></svg-icon>
                        <p>待付款</p>
                    </div>
                    <div class="wait-send"
                        @click="gotoUrl('/order', 1)">
                        <svg-icon icon-class="order-wait-send"
                            size="30"
                            color="#8fcd34"></svg-icon>
                        <p>待发货</p>
                    </div>
                    <div class="send"
                        @click="gotoUrl('/order', 2)">
                        <svg-icon icon-class="order-send"
                            size="30"
                            color="#8fcd34"></svg-icon>
                        <p>发货中</p>
                    </div>
                    <div class="finish"
                        @click="gotoUrl('/order', 3)">
                        <svg-icon icon-class="order-finish"
                            size="30"
                            color="#8fcd34"></svg-icon>
                        <p>完成</p>
                    </div>
                </div>
            </div> -->
            <div class="list-box">
                <div class="list"
                    @click="gotoUrl('/address')">
                    <div class="left">
                        <svg-icon icon-class="address"
                            color="#8fcd34"
                            size="25">
                                <img src="../../static/img/logo.png" />
                            </svg-icon>
                        <p>{{nicknamehtml}}<br>联系电话：{{usernamehtml}}</p>
                    </div>
                    <div class="right">
                        <svg-icon icon-class="right"
                            color="#8fcd34"
                            size="25" class="mui-icon icon-zuojiantou"></svg-icon>
                    </div>
                </div>
                <!--<a href="/jsapi/example/jsapi.php"  class="list">
                    <div class="left">
                        <svg-icon icon-class="address"
                            color="#8fcd34"
                            size="25">
                                <img src="../../static/img/dd.png" />
                            </svg-icon>
                        <p>订单管理</p>
                    </div>
                    <div class="right">
                        <svg-icon icon-class="right"
                            color="#8fcd34"
                            size="25" class="mui-icon icon-zuojiantou"></svg-icon>
                    </div>
                </a>-->
                <div class="list">
                    <div class="left">
                        <svg-icon icon-class="express"
                            color="#8fcd34"
                            size="25">
                                <img src="../../static/img/ft.png" />
                            </svg-icon>
                        <p>我的收藏</p>
                    </div>
                    <div class="right">
                        <svg-icon icon-class="right"
                            color="#8fcd34"
                            size="25" class="mui-icon icon-zuojiantou"></svg-icon>
                    </div>
                </div>
                <div class="list">
                    <div class="left">
                        <svg-icon icon-class="message"
                            color="#8fcd34"
                            size="25">
                                <img src="../../static/img/cf.png" />
                            </svg-icon>
                        <p>账户/密码</p>
                    </div>
                    <div class="right">
                        <svg-icon icon-class="right"
                            color="#8fcd34"
                            size="25" class="mui-icon icon-zuojiantou"></svg-icon>
                    </div>
                </div>
                <div class="list"
                    @click="gotoUrl('/setting')">
                    <div class="left">
                        <svg-icon icon-class="setting"
                            color="#8fcd34"
                            size="25">
                                <img src="../../static/img/cd.png" />
                            </svg-icon>
                        <p>关于瓦的农庄</p>
                    </div>
                    <div class="right">
                        <svg-icon icon-class="right"
                            color="#8fcd34"
                            size="25" class="mui-icon icon-zuojiantou"></svg-icon>
                    </div>
                </div>
                <a href="http://apposs.farmhn.com/app/farm.apk"  class="list">
                    <div class="left">
                        <svg-icon icon-class="help"
                            color="#8fcd34"
                            size="25">
                                <img src="../../static/img/xr.png" />
                            </svg-icon>
                        <p>商户APP下载(安卓)</p>
                    </div>
                    <div class="right">
                        <svg-icon icon-class="right"
                            color="#8fcd34"
                            size="25" class="mui-icon icon-zuojiantou"></svg-icon>
                    </div>
                </a>
            </div>
            <!-- 轮播图  :url="lunboUrl"-->
            <my-swipe></my-swipe>
        </div>
        <br>
        <br>
        <br>
        <br>
    </div>
</template>

<script>
export default {
    name: 'member.list',
    data() {
        return {
            nicknamehtml: '海口火山口农家乐',
            usernamehtml: '13355230255',
        }
    },
    created(){
        this.loadMore();//1
    },
    methods: {
        handleBack(){
                this.$router.go(-1); //根据浏览器记录返回上一次
            }
            /*,
        gotoUrl(url) {

        }*/
        ,
        loadMore(){
            let username = this.$route.params.username;
            let id = this.$route.params.id;
            // let id = this.$route.params.id;
            // let password = this.$route.params.password;
            let idnamehtml = 'username::' + username;
            if(id > 0){
                idnamehtml = 'username::' + username + ',id::' + id;
                // idnamehtml = 'username::' + username + ',password::' + password + '::md5';
            }else{
                idnamehtml = 'username::' + username;
            }
            this.$ajax.get('?tbname=member&where=' + idnamehtml)
            .then(res=>{
                if(res.data.total > 0){
                    this.nicknamehtml = res.data.rows[0].nickname;
                    this.usernamehtml = res.data.rows[0].username;
                }else{
                    this.nicknamehtml = '海口火山口农家乐';
                    this.usernamehtml = '13355230255';
                }
            })
            .catch(err=>{
                console.log(err);
            })
        }
    }
}
</script>

<style scoped>
.icon-zuojiantou:before {
    color: #999;
}
/*lang="less"*/
    #member .header {
        background-color: rgba(0, 0, 0, 0.8);
        padding-bottom: 40%;
        border-radius: ~"0px 0px 50% 50% / 0px 0px 20% 20%;";
        position: relative;
    }
        #member .header .header-content {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translateX(-50%) translateY(-50%);
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
            #member .header .header-content .header-img {
                width: 80px;
                height: 80px;
                border-radius: 50%;
                background-color: #fff;
                display: flex;
                justify-content: center;
                align-items: center;
            }
                #member .header .header-content .header-img img {
                    height: 90%;
                    width: 90%;
                    border-radius: 50%;
                }
            #member .header .header-content .name {
                font-size: 15px;
                text-align: center;
                color: #fff;
            }
        #member .header .setting {
            position: absolute;
            right: 10px;
            top: 10px;
            
        }
        #member .body {
            margin-top: 50px;
        }
        
        #member .body .my-order {
            margin: 20px 0;
        }
            #member .body .my-order .order-icon {
                display: flex;
                justify-content: center;
                align-items: center;
            }
                #member .body .my-order .order-icon div {
                    flex: 1;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-direction: column;
                    font-size: 12px;
                }
                    #member .body .my-order .order-icon div .svg-icon {
                        margin: 10px 0;
                    }
        #member .body .list-box {
            /*padding: 0 10px 10px;*/
        }
            #member .body .list-box .list:nth-child(1) , #member .body .list-box .list:nth-child(2) {
                margin: 10px 0;
            }
            #member .body .list-box .list {
               
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 0px 20px;
                margin: -1px 0;
                border-radius: 3px;
                border: 1px solid #ddd;
            }
                #member .body .list-box .list &:last-child {
                    margin-bottom: 0;
                }
               
                #member .body .list-box .list div {
                    margin: 5px 0;
                }
                #member .body .list-box .list .left {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    font-size: 13px;
                }
                    #member .body .list-box .list .left p {
                        margin-left: 10px; margin-top: 10px;
                    }
                #member .body .list-box .list .right {
                    line-height: 0;
                }
</style>

